// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "PaperCharacter.h"
#include "RunnerCharacterBase.generated.h"


class UInputMappingContext;
class UInputAction;

/**	纸片跑步角色基类
 * 
 */
UCLASS()
class MASHRUNNER_API ARunnerCharacterBase : public APaperCharacter
{
	GENERATED_BODY()

public:
	ARunnerCharacterBase();

protected:
	virtual void BeginPlay() override;

public:
	virtual void SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) override;

	virtual void PossessedBy(AController* NewController) override;

	// 默认的映射
	UPROPERTY(EditDefaultsOnly, Category="默认")
	UInputMappingContext* MappingContext = nullptr;

	// 左动作
	UPROPERTY(EditDefaultsOnly, Category="默认")
	UInputAction* PowerLeftAction = nullptr;

	// 右动作
	UPROPERTY(EditDefaultsOnly, Category="默认")
	UInputAction* PowerRigAction = nullptr;

	// 左按下
	UFUNCTION(BlueprintImplementableEvent)
	void PowerLeftPressed();
	// 左松开
	UFUNCTION(BlueprintImplementableEvent)
	void PowerLeftReleased();

	// 右按下
	UFUNCTION(BlueprintImplementableEvent)
	void PowerRigPressed();
	// 右松开
	UFUNCTION(BlueprintImplementableEvent)
	void PowerRigReleased();
};
